home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / The World of Computer Software.iso / msgbar10.zip / API.TXT < prev    next >
Text File  |  1992-12-30  |  6KB  |  229 lines

  1. Paul King
  2.  
  3.  
  4.  
  5.  
  6.  
  7. ____________________________________________________________
  8.                                                  Message Bar
  9.  
  10.  
  11. Application Programming Interface
  12. Version 1.0
  13.  
  14.  
  15.  
  16.                                            December 30, 1992
  17.                                                             
  18.  
  19. CONTENTS
  20.  
  21. CONTENTS                                                 i
  22. Preface                                                  1
  23. Intended Audience                                        1
  24. Message Bar API                                          1
  25. InitMB                                                   2
  26.      Function Prototype                                  2
  27.      Purpose                                             2
  28.      Variables                                           2
  29.      Returns                                             2
  30.      Comments                                            2
  31. KillMB                                                   3
  32.      Function Prototype                                  3
  33.      Purpose                                             3
  34.      Variables                                           3
  35.      Comments                                            3
  36. ResizeMB                                                 4
  37.      Function Prototype                                  4
  38.      Purpose                                             4
  39.      Variables                                           4
  40.      Comments                                            4
  41. ColorMB                                                  5
  42.      Function Prototype                                  5
  43.      Purpose                                             5
  44.      Variables                                           5
  45.      Returns                                             5
  46.      Comments                                            5
  47. MBText                                                   6
  48.      Function Prototype                                  6
  49.      Purpose                                             6
  50.      Variables                                           6
  51.      Comments                                            6
  52. MBShow                                                   7
  53.      Function Prototype                                  7
  54.      Purpose                                             7
  55.      Variables                                           7
  56.      Comments                                            7
  57.  
  58. Preface
  59. This document provides a detailed description of the
  60. application programming interface (API) used with the
  61. Message Bar DLL (MESSAGEB.DLL).  All software interfaces are
  62. available from any application that can call routines
  63. located in DLL's.  All of this software was written in C.
  64.  
  65. Message Bar is a control that can be used by an application
  66. to display messages in the lower portion of the
  67. application's main window.  This API explains all of the
  68. current functionality supported.
  69.  
  70.  
  71. Intended Audience
  72. This document is for programmers.  The reader should have a
  73. thorough understanding of MS-DOS, Microsoft Windows, and C.
  74.  
  75.  
  76. Message Bar API
  77. The following function calls are exported in the
  78. MESSAGEB.DLL:
  79.  
  80.   InitMB
  81.   KillMB
  82.   ResizeMB
  83.   ColorMB
  84.   MBText
  85.   MBShow
  86.  
  87. Each of these functions is described below.
  88.  
  89.  
  90. InitMB
  91.  
  92. Function Prototype
  93. InitMB(HWND, HINSTANCE, COLORREF, COLORREF, BOOL)
  94.  
  95. Purpose
  96. Init the message bar
  97.  
  98. Variables
  99. HWND
  100. Handle of the Window that will contain the Message Bar.
  101.  
  102. HINSTANCE
  103. Handle of the Instance of the Owning Application.
  104.  
  105. COLORREF
  106. Message Bar Background Color
  107.  
  108. COLORREF
  109. Message Bar Text Color
  110.  
  111. BOOL
  112. Initial display state
  113.  
  114. Returns
  115. BOOL
  116. TRUE on success, FALSE on failure.
  117.  
  118. Comments
  119. InitMB should only be called ONCE per application.  The
  120. current design of MESSAGEB.DLL only allows one message bar
  121. per application.  The calling program may specify the text
  122. and background colors to be displayed on the status bar as
  123. well as the initial display state of the status bar.  This
  124. call should be placed after the CreateWindow call for the
  125. main application window.
  126.  
  127.  
  128. KillMB
  129. Function Prototype
  130. KillMB(void)
  131.  
  132. Purpose
  133. Remove the message bar
  134.  
  135. Variables
  136. NONE
  137.  
  138. Comments
  139. KillMB must be called ONCE for each application that issued
  140. and received a TRUE response from a InitMB call.  Not
  141. calling KillMB will eventually cause Windows to crash do to
  142. lack of resources.  This call should be placed in the
  143. WM_DESTROY message of the application callback procedure.
  144.  
  145.  
  146. ResizeMB
  147. Function Prototype
  148. ResizeMB(void)
  149.  
  150. Purpose
  151. Re-sizes the message bar
  152.  
  153. Variables
  154. NONE
  155.  
  156. Comments
  157. ResizeMB must be placed in the WM_SIZE message of the
  158. application callback procedure.  If this function call is
  159. not placed here, the message bar will not change size as the
  160. owning window changes size.
  161.  
  162.  
  163. ColorMB
  164. Function Prototype
  165. ColorMB(WPARAM, LPARAM)
  166.  
  167. Purpose
  168. Paint the Message Bar
  169.  
  170. Variables
  171. WPARAM
  172. wParam from the WM_CTLCOLOR Message.
  173.  
  174. LPARAM
  175. lParam from the WM_CTLCOLOR Message.
  176.  
  177. Returns
  178. LRESULT
  179. To be returned to Windows.
  180.  
  181. Comments
  182. This call should be placed in the WM_CTLCOLOR message of the
  183. application callback procedure.  The result should be
  184. returned to Windows via the return statement.  An example of
  185. the use of this call is in SAMPLE.C.  If this call is not
  186. used, the control will never be painted.
  187.  
  188.  
  189. MBText
  190. Function Prototype
  191. MBText(LPSTR)
  192.  
  193. Purpose
  194. Place text on the Message Bar
  195.  
  196. Variables
  197. LPSTR
  198. Long pointer to a NULL terminated string.  There is no
  199. guarantee that all of the contents of the string will be
  200. displayed.  If the string is longer than the display, the
  201. string will be clipped.  All strings are left-justified
  202. within the control.
  203.  
  204. Comments
  205. This function places text in the Message Bar.  To remove the
  206. text, call MBText ("").
  207.  
  208.  
  209. MBShow
  210. Function Prototype
  211. MBShow(BOOL)
  212.  
  213. Purpose
  214. Turn the Message Bar on of off
  215.  
  216. Variables
  217. BOOL
  218. TRUE turns the Message Bar on.  FALSE hides the Message Bar.
  219. Comments
  220.  
  221.  
  222.  
  223.  
  224.  
  225.  
  226.  
  227.  
  228.  
  229.